local Distance = 2;
local Precision = 3;
local VK_A = 65
local VK_W = 87
local VK_D = 68
local VK_S = 83
function follow(Target)
	if not Target then return end

	if UnitCastingInfo('player') or UnitChannelInfo('player') then
		return
	end

	if not UnitExists(Target) or not UnitIsVisible(Target) or UnitIsDead("Player") then
		return
	end
	if GetKeyState(VK_A)  then return end
	if GetKeyState(VK_W)  then return end
	if GetKeyState(VK_D)  then return end
	if GetKeyState(VK_S)  then return end
	MoveTo(ObjectPosition(Target))

	-- local PlayerX, PlayerY, PlayerZ = ObjectPosition("Player");
	-- local TargetX, TargetY, TargetZ = ObjectPosition(Target);
	-- if GetDistanceBetweenPositions(PlayerX, PlayerY, PlayerZ, TargetX, TargetY, TargetZ) >= Precision then
	-- 	local AngleXY, AngleXYZ = GetAnglesBetweenPositions(TargetX, TargetY, TargetZ, PlayerX, PlayerY, PlayerZ);
	-- 	MoveTo(GetPositionFromPosition(TargetX, TargetY, TargetZ, Distance, AngleXY, AngleXYZ));
	-- else
	-- 	-- local Angle = GetAnglesBetweenPositions(PlayerX, PlayerY, PlayerZ, TargetX, TargetY, TargetZ);
	-- 	-- FaceDirection(Angle, false);
	-- end
end